Learn R Programming

hstats (version 1.2.2)

[.hstats_matrix: Subsets "hstats_matrix" Object

Description

Use standard square bracket subsetting to select rows and/or columns of statistics "M" (and "SE" in case of permutation importance statistics). Implies head() and tail().

Usage

# S3 method for hstats_matrix
[(x, i, j, ...)

Value

A new object of class "hstats_matrix".

Arguments

x

An object of class "hstats_matrix".

i

Row subsetting.

j

Column subsetting.

...

Currently unused.

Examples

Run this code
fit <- lm(as.matrix(iris[1:2]) ~ Petal.Length + Petal.Width * Species, data = iris)
imp <- perm_importance(fit, X = iris, y = c("Sepal.Length", "Sepal.Width"))
head(imp, 1)
tail(imp, 2)
imp[1, "Sepal.Length"]
imp[1]
imp[, "Sepal.Width"]$SE
plot(imp[, "Sepal.Width"])

Run the code above in your browser using DataLab